import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import render from '@dfeidao/atom-web/render/render';
import set_node_cls from '@dfeidao/atom-web/ui/set-node-cls';
import p001 from './p001';
import p002 from './p002';
export default async function a001(fd: IFeidaoAiBrowserComponent) {
	// todo 打开弹窗
	const ssr = fd.data.node.querySelector<HTMLDivElement>('[data-zzs="ssr"]');
	set_node_cls(ssr, 'display-n', false);

	const res = await nodejs<{ rs: Array<{}>, c: number }>('device-management/zj-000002/s001', {
		filter: {
			hidden_source: '',
			hidden_name: '',
			page_no: 1
		}
	});
	const page_no = 1;
	render(fd, res.rs, p001, 'p001', 'inner');
	render(fd, { pageno: page_no, total: res.c }, p002, 'p002', 'inner');
}
